package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.system.SysBoatShipline;
import com.ruoyi.system.mapper.SysBoatShiplineMapper;
import com.ruoyi.system.service.ISysBoatShiplineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 船只与自动航线关联Service业务层处理
 *
 * @author zjw
 * @date 2023-11-21
 */
@Service
public class SysBoatShiplineServiceImpl implements ISysBoatShiplineService {
    @Autowired
    private SysBoatShiplineMapper sysBoatShiplineMapper;

    /**
     * 查询船只与自动航线关联
     *
     * @param boatId 船只与自动航线关联主键
     * @return 船只与自动航线关联
     */
    @Override
    public SysBoatShipline selectSysBoatShiplineByBoatId(Long boatId) {
        return sysBoatShiplineMapper.selectSysBoatShiplineByBoatId(boatId);
    }

    /**
     * 查询船只与自动航线关联列表
     *
     * @param sysBoatShipline 船只与自动航线关联
     * @return 船只与自动航线关联
     */
    @Override
    public List<SysBoatShipline> selectSysBoatShiplineList(SysBoatShipline sysBoatShipline) {
        return sysBoatShiplineMapper.selectSysBoatShiplineList(sysBoatShipline);
    }

    /**
     * 新增船只与自动航线关联
     *
     * @param sysBoatShipline 船只与自动航线关联
     * @return 结果
     */
    @Override
    public int insertSysBoatShipline(SysBoatShipline sysBoatShipline) {
        return sysBoatShiplineMapper.insertSysBoatShipline(sysBoatShipline);
    }

    /**
     * 修改船只与自动航线关联
     *
     * @param sysBoatShipline 船只与自动航线关联
     * @return 结果
     */
    @Override
    public int updateSysBoatShipline(SysBoatShipline sysBoatShipline) {
        return sysBoatShiplineMapper.updateSysBoatShipline(sysBoatShipline);
    }

    /**
     * 批量删除船只与自动航线关联
     *
     * @param boatIds 需要删除的船只与自动航线关联主键
     * @return 结果
     */
    @Override
    public int deleteSysBoatShiplineByBoatIds(Long[] boatIds) {
        return sysBoatShiplineMapper.deleteSysBoatShiplineByBoatIds(boatIds);
    }

    /**
     * 删除船只与自动航线关联信息
     *
     * @param boatId 船只与自动航线关联主键
     * @return 结果
     */
    @Override
    public int deleteSysBoatShiplineByBoatId(Long boatId) {
        return sysBoatShiplineMapper.deleteSysBoatShiplineByBoatId(boatId);
    }
}
